import React from 'react'
import { Switch } from 'react-router-dom'
import { getRoutes } from '.'
/**
 * 路由占位组件
 * @param {*} props 
 * @returns 
 */
export default function RouterView(props) {
    return (<Switch> {getRoutes(props.parent)} </Switch>)
}

RouterView.defaultProps = {
    parent: 'admin' // 父级路由规则name, 默认admin
}